package com.lanju.task;

import java.io.IOException;

import org.apache.http.client.ClientProtocolException;
import org.springframework.stereotype.Component;

import com.lanju.controller.WeiXinInterfaceController;

@Component
public class GetTokenJob {
	WeiXinInterfaceController weixinf = new WeiXinInterfaceController();
	
//	@Scheduled(cron="0 0 */2 * * ? ") //间隔5秒执行
	public void getToken() throws ClientProtocolException{
		try {
			System.out.println(weixinf);
			weixinf.getAccessToken();
		} catch (IOException e) {
			e.printStackTrace();
		}
	}
}
